Buffer pixel formats.
Buffer usage flags, specifying how the buffer will be accessed.
Acquire a reference on the given AHardwareBuffer object.
Allocates a buffer that matches the passed AHardwareBuffer_Desc.
Return a description of the AHardwareBuffer in the passed AHardwareBuffer_Desc struct.
Test whether the given format and usage flag combination is allocatable.
Lock the AHardwareBuffer for direct CPU access.
Lock an AHardwareBuffer for direct CPU access.
Lock a potentially multi-planar AHardwareBuffer for direct CPU access.
Receive an AHardwareBuffer from an AF_UNIX socket.
Remove a reference that was previously acquired with AHardwareBuffer_acquire() or AHardwareBuffer_allocate().
Send the AHardwareBuffer to an AF_UNIX socket.
Unlock the AHardwareBuffer from direct CPU access.
Opaque handle for a native hardware buffer.
Buffer description. Used for allocating new buffers and querying parameters of existing ones.
Holds data for a single image plane.
Holds all image planes that contain the pixel data.
@defgroup AHardwareBuffer Native Hardware Buffer
AHardwareBuffer objects represent chunks of memory that can be accessed by various hardware components in the system. It can be easily converted to the Java counterpart android.hardware.HardwareBuffer and passed between processes using Binder. All operations involving AHardwareBuffer and HardwareBuffer are zero-copy, i.e., passing AHardwareBuffer to another process creates a shared view of the same region of memory.
AHardwareBuffers can be bound to EGL/OpenGL and Vulkan primitives. For EGL, use the extension function eglGetNativeClientBufferANDROID to obtain an EGLClientBuffer and pass it directly to eglCreateImageKHR. Refer to the EGL extensions EGL_ANDROID_get_native_client_buffer and EGL_ANDROID_image_native_buffer for more information. In Vulkan, the contents of the AHardwareBuffer can be accessed as external memory. See the VK_ANDROID_external_memory_android_hardware_buffer extension for details.
@{